package com.deng.eventflow.core.petitpoucet;

import java.util.Collection;

public class DirectValue extends AggregateFunction {
    public static final transient DirectValue instance = new DirectValue();

    public DirectValue(Collection<NodeFunction> nodes)
    {
        super(getCaption(nodes.size()), nodes);
    }

    public DirectValue(NodeFunction ... nodes)
    {
        super(getCaption(nodes.length), nodes);
    }

    public void add(NodeFunction node)
    {
        m_nodes.add(node);
    }

    protected static String getCaption(int n)
    {
        if (n > 1)
        {
            return "The values of";
        }
        return "The value of";
    }
}
